/**
  * Copyright (c) CSIRO Australia, 2009
  *
  * @author $Author: jia020 $
  * @version $Id: UserManager.java 643 2009-05-20 00:20:55Z jia020 $
  */
package au.csiro.nt.pdsp.register;

import java.sql.ResultSet;

import au.csiro.nt.pdsp.client.PdspConst;
import au.csiro.nt.pdsp.util.Config;

public class UserManager {
	public boolean subscribePDSP(String username,boolean subscribe) {
		String status = (subscribe)? PdspConst.USER_STATUS_SUBSCRIBED:PdspConst.USER_STATUS_UNSUBSCRIBED;
		String sql = "update users set status = '" + status + "' where username = '" + username + "'";
		return Config.getInstance().mysql2.execUpdate(sql);
	}
}
